package controllers

import (
	"github.com/astaxie/beego"
)

type Controller struct {
	beego.Controller
}

func (c *Controller) Get() {
	c.TplName = "base.html"
	//http://127.0.0.1:8080/

}

func (c *Controller) BaseText() {
	idStr := c.Input().Get("msg_id")
	num := c.Input().Get("num")
	c.Ctx.SetCookie("msg_id", idStr)
	c.Ctx.SetCookie("num", num)
	userId := c.Ctx.GetCookie("userId")
	if userId == "" || userId == "null" {
		c.TplName = "base_text2.html"
		return
	}
	c.TplName = "base_text.html"
	//http://127.0.0.1:8080/
}

func (c *Controller) UpMsgPage() {
	idStr := c.Input().Get("msg_id")
	c.Ctx.SetCookie("msg_id", idStr)
	c.TplName = "up_message.html"
	//http://127.0.0.1:8080/

}
